package vashion.azeroth.core.service.tran;

import java.util.List;

import vashion.azeroth.core.personal.pojo.PersonalMember;
import vashion.azeroth.core.personal.tran.pojo.PersonalBankInfo;
import vashion.azeroth.core.personal.tran.pojo.PersonalDisburse;
import vashion.azeroth.core.personal.tran.pojo.PersonalDisburseExt;
import vashion.azeroth.core.personal.tran.pojo.PersonalSnapshot;
import vashion.azeroth.core.result.ApiResult;

public interface PersonalDisburseService<T> {

	ApiResult<String> createDisburse(PersonalMember member, PersonalDisburse disburse);
	
	PersonalDisburse getByDisburseNo(String disburseNo);
	
	ApiResult<List<PersonalDisburse>> queryOrder(PersonalDisburse disburse, Integer status);
	
	ApiResult<List<PersonalDisburse>> queryOrderByNo(PersonalDisburse disburse);
	
	ApiResult<Boolean> changeOrder(String disburseNo, String type);
	
	ApiResult<String> modifyDisburseAddress(PersonalDisburse disburse);
	
	ApiResult<List<PersonalDisburseExt>> getDisburseList(PersonalDisburseExt disburse);
	
	List<PersonalDisburseExt> queryDisburseList(PersonalDisburseExt disburse);

	ApiResult<String> sendGoods(PersonalDisburse disburse);
	
	/**
	 * 退货订单查询
	 * @param memberId
	 * @param disburseNo
	 * @return
	 */
	ApiResult<PersonalDisburse> queryReturnGoodsInfo(Long memberId, String disburseNo);
	
	/**
	 * 提交退款申请
	 * @param disburse
	 * @return
	 */
	ApiResult<String> submitReturnGoodsApply(PersonalSnapshot snapshot);
	
	/**
	 * 取消退款申请
	 * @param disburseNo
	 * @return
	 */
	ApiResult<String> cancelReturnGoodsApply(PersonalSnapshot snapshot);
	
	/**
	 * 关闭未付款订单
	 */
	void closeOrder();
	
	/**
	 * 关闭未接单订单
	 */
	void closeUnpaymentOrder();
	
	ApiResult<String> submitLogisticsInfo(String returnGoodsNo, String logisticsCompany, String logisticsNo);

	void recalculate();
	
	ApiResult<String> uploadCertificatePic(PersonalDisburse disburse);

	ApiResult<PersonalBankInfo> queryBankInfo(Long memberId);

}
